package com.aha.dataanalyzeandview.exception;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

public class RdbAdapterException extends RuntimeException {
    public RdbAdapterException() {
        super();
    }

    public RdbAdapterException(String message) {



        super(message);
    }


    public RdbAdapterException(String message, Connection conn , PreparedStatement ps) {
        super(message);
        if (ps != null) {
            try {
                ps.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }

        if (conn != null) {
            try {
                conn.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
            }



    }
}
